home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 52 lines | [TEXT/GEOL] |
- Item 9059786 27-Dec-90 03:23PST
-
- From: AUST0134 Jam Software Sydney,IVR
-
- To: MACAPP.TECH$ MacApp Technical
- CSX.ACCOUNT1 CSX Technology, Scott Steffan,PRT
-
- ------------------------------------------------------------------------------
-
- Sub: Re[3] default btns on the fly
-
- Thomas,
-
- I have my dialogs automatically set up the default button adornment on opening
- with the following OVERRIDE. Note the default button is left centred around
- its position as specified in the View.
- Of course you could add a method with the same sort of code to change the
- default button while the dialog was actually up and running.
- (My thanx to a link (I think it was from Curtis Faith?), which advocated this
- idea)
-
- {==============================================
- TAutoDialog
- Automatically circles the default button
- ==============================================}
- PROCEDURE TAutoDialog.DoOpen; OVERRIDE;
- VAR
- defaultView:TButton;
- BEGIN
- IF LONGINT(fDefaultItem) <> LONGINT(kNoIdentifier) THEN BEGIN
- defaultView := TButton(FindSubView(fDefaultItem));
- IF (defaultView <> NIL) & (NOT (adnRRect IN defaultView.fAdornment)) THEN
- BEGIN
- {$PUSH} {$H-}
- defaultView.fAdornment := [adnRRect];
- SetRect(defaultView.fInset,4,4,4,4);
- SetPt(defaultView.fPenSize,3,3);
- WITH defaultView.fLocation DO
- defaultView.Locate(h - 4, v - 4, kDontRedraw);
- WITH defaultView.fSize DO
- defaultView.Resize(h + 8, v + 8, kRedraw);
- {$POP}
- END;
- END;
- INHERITED DoOpen;
- END;
-
- Tseung Cheung
- JAM Software Pty Ltd
- ALink AUST0134
-
-